package com.bjbn.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * RocketMQ配置类
 * 
 * @author bjbn
 */
@Data
@Component
@ConfigurationProperties(prefix = "rocketmq")
public class RocketMQConfig {

    /**
     * 全域机场运行管理平台配置
     */
    private Taom taom;

    /**
     * 机场运行信息集成系统配置
     */
    private Aoip aoip;

    /**
     * 机场协同决策
     */
    private Acdm acdm;

    @Data
    public static class Taom {
        /**
         * NameServer地址
         */
        private String nameServer;

        /**
         * 消费者配置
         */
        private Consumer consumer;
    }

    @Data
    public static class Aoip {
        /**
         * NameServer地址
         */
        private String nameServer;

        /**
         * 消费者配置
         */
        private Consumer consumer;
    }

    @Data
    public static class Acdm {
        /**
         * NameServer地址
         */
        private String nameServer;

        /**
         * 消费者配置
         */
        private Consumer consumer;
    }

    @Data
    public static class Consumer {
        /**
         * 消费者组
         */
        private String group;

        /**
         * Topic名称
         */
        private String topic;

        /**
         * Key
         */
        private String key;

        /**
         * Secret
         */
        private String secret;

        /**
         * 订阅表达式
         */
        private String subExpression;
    }
} 